package com.jcfk.eam.enums;

import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.jcfk.common.security.utils.SecurityUtils;
import com.jcfk.eam.domain.po.base.EamRepairOrder;
import lombok.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Function;

@AllArgsConstructor
@Getter
public enum RepairOrderRecordOperateType {

    CREATED("0", "报修"),

    ANSWERED("1", "应答"),

    START("2", "开始维修"),

    FINISHED("3", "维修完成"),

    CONFIRM("4", "完成确认"),

    CANCEL("5", "取消"),
    // 有关闭原因
    CLOSE("6", "关闭"),

    RE_REPAIR("7", "重新维修"),

    TRANSFER("8", "转交"),

    ASSIGN("9", "指派"),

    OUT_SOURCING_START("10", "委外开始"),

    OUT_SOURCING_FINISH("11", "委外完成"),

    ;
    private final String value;
    private final String desc;
    public static RepairOrderRecordOperateType getByValue(String value) {
        for (RepairOrderRecordOperateType operateType : RepairOrderRecordOperateType.values()) {
            if (operateType.getValue().equals(value)) {
                return operateType;
            }
        }
        return null;
    }
}
